/**
 * 
 */
package com.google.code.netz.wfe.model;

/**
 * {@link IResult} is defined for a task as a possible set of outcomes from a
 * {@link ITask}'s execution.
 * 
 * @author <a href='mailto:rahul.thakur.xdev@gmail.com'>Rahul Thakur</a>
 * @since 1.0
 * @version $Id$
 */
public interface IResult {

	/**
	 * Label for the Result that is used to expose this Result instance to other
	 * workflow entities.
	 * 
	 * @return
	 */
	public String getLabel();

	/**
	 * Evaluates to <code>true</code> if there is some data wrapped inside the
	 * result, else <code>false</code>. Wrapped dFSata may be produced by an
	 * executing {@link ITask}.
	 * 
	 * @return
	 */
	public boolean hasData();

	/**
	 * Returns an instance of data wrapped inside this IResult instance.
	 * <p>
	 * A <code>null</code> is returned if {@link #hasData()} evaluates to
	 * <code>false</code.
	 * 
	 * @return
	 */
	public Object getData();

	/**
	 * Returns the name of the {@link Class} for the data instance wrapped
	 * inside this {@link IResult} instance.
	 * <p>
	 * A <code>null</code> is returned if {@link #hasData()} evaluates to
	 * <code>false</code.
	 * 
	 * @return
	 */
	public Class<?> getDataClass();

}
